<?php
	@mysql_pconnect('localhost', 'root', '');
	@mysql_select_db('studial');
	if(isset($_GET['id']))
	{
		$course_id = $_GET['id'];
		$user_id = $_COOKIE['studialuserid'];	
		mysql_query("delete from `enroll` where `user_id` = '".$user_id."' and `course_id` = '".$course_id."';");
		echo "da query";
		header ("Location: courselist.php?id=".$user_id);	
	}
?>